package com.taysear.dbservice;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

public class DirectTestClient {

	public static void main(String[] args) {
		try {
			DbServiceI coreServiceI = new DbServiceI();
			coreServiceI.startDatabaseConnectionPool();

			ServiceParameter sp = new ServiceParameter(new HashMap<String, String>());
			/*sp.param.put("username", "admin");
			sp.param.put("password", "21232f297a57a5a743894a0e4a801fc3");
			
			sp.param.put("userId", "1");
    		sp.param.put("travelDate", "2012-08-29 11:40:07");
    		sp.param.put("loadingsheetId", "3");
    		sp.param.put("timeId", "5");
    		sp.param.put("seatId", "8");
    		sp.param.put("name", "ali");
    		sp.param.put("mobile", "07777777");
    		sp.param.put("nationality", "2");
    		sp.param.put("idNumber", "076878");
    		sp.param.put("childAge", "");*/
    		
			sp.param.put("1", "userId====1///name====kaaho ahmed awale///mobile====254787878788///nationality====1///idNumber====///childAge====8///amount====1799.9999999999999888977697537484345957636833190917968750000///currencyName====KSH///pickupPoint====///bookingAction====1///bookingStatus====1///seatStatus====0///isOneWay====0///travelDate====2012-11-20 09:00:00///reportingDate====2012-11-20 08:30:00///loadingsheetId====1///seatId====33///fromSubstation====1///toSubstation====4");

			ServiceResult result = coreServiceI.saveBookings(sp);

			if (result.status) {
				System.out.println("records found: " + result.param.get("RECORDS"));
			} else {
				System.out.println(result.message);
			}
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}
}